package cn.gok.test;

import cn.gok.entity.HeadTeacher;
import cn.gok.entity.MyJDBC;
import cn.gok.entity.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
    测试SpEL表达式
 */

public class SpringTest07 {
    public static void main(String[] args) throws InterruptedException {
        ApplicationContext app  = new ClassPathXmlApplicationContext("application04.xml");

        Student student1 = app.getBean("student1", Student.class);
        System.out.println(student1);

        Student student2 = app.getBean("student2", Student.class);
        System.out.println(student2);

        Student student3 = app.getBean("student3", Student.class);
        System.out.println(student3);

        HeadTeacher headTeacher2 = app.getBean("headTeacher2", HeadTeacher.class);
        System.out.println(headTeacher2);

        MyJDBC jdbc = app.getBean("myJDBC", MyJDBC.class);
        System.out.println(jdbc);

    }
}
